<template>
	<view class="box">

		<!-- <intPlay></intPlay> -->
		<!-- play -->
		<view class="title">
			<view class="">
				等级
			</view>
			<view class="felx  titleRight">
				<view class="">
					金币
				</view>
				<view class="">
					宝石
				</view>
			</view>
		</view>


		<!--  -->
		<swiper class="listCentent" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item v-for="item in listCentent" :key="item">
				<view class="swiper-item">
					<view class="itemPlay" @click="toPlay(item)">
						{{item}}
					</view>
				</view>
			</swiper-item>
		</swiper>
		<view class="felx felxs boxs userBox">
			<view class="">
				农场
			</view>
			<view class="user">
				英雄
			</view>
			<view class="">
				宝箱
			</view>
		</view>
	</view>
</template>


<script setup>
	import {
		onShow
	} from '@dcloudio/uni-app'
	import {
		ref
	} from 'vue'
	onShow(() => {
		let data = {
			"image": "https://upfile.baojiji.cn/c56a1202405241605424501.png",
			"slider_image": [
				"https://upfile.baojiji.cn/c56a1202405241605424501.png"
			],
			"store_name": "2",
			"store_info": "",
			"keyword": "",
			"brand_id": "",
			"cate_id": 316,
			"mer_cate_id": [],
			"bar_code": "1",
			"unit_name": "",
			"sort": 0,
			"is_good": 0,
			"temp_id": "",
			"video_link": "",
			"zipfile_src": "",
			"fileList": [],
			"attrValue": [{
				"image": "",
				"price": 0,
				"cost": 0,
				"ot_price": 0,
				"stock": 0,
				"bar_code": "",
				"weight": 0,
				"volume": 0,
				"brokerage": 0,
				"brokerage_two": 0,
				"detail": {
					"尺码": "均码"
				},
				"value0": "均码"
			}],
			"attr": [{
				"value": "尺码",
				"detail": [
					"均码"
				]
			}],
			"attrs": [],
			"extension_type": 0,
			"content": "<p><img src=\"https://upfile.baojiji.cn/c56a1202405241605424501.png\"/></p><p><img src=\"https://upfile.baojiji.cn/c56a1202405241605424501.png\"/></p>",
			"spec_type": 1,
			"give_coupon_ids": [],
			"is_gift_bag": 0,
			"couponData": [],
			"material": "",
			"closedway": "",
			"packingstyle": "",
			"popularele": "",
			"popularstyle": "",
			"sex": ""
		}
		uni.request({
			url: 'https://www.baojiji.cn/inm/store/product/create',
			method: 'POST',
			data: data,
			header: {
				"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
				"x-token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cuYmFvamlqaS5jbiIsImF1ZCI6Ind3dy5iYW9qaWppLmNuIiwiaWF0IjoxNzE2NTE4NTAwLCJuYmYiOjE3MTY1MTg1MDAsImV4cCI6MTcxNjU0MDEwMCwianRpIjpbODE3LCJtZXIiXX0.futJoHT76g-AmHxTZZ2Lr98Y5a-dxczgq6PQRaFG-L0",
			},
			success(res) {
				console.log(res);
			}
		})
	})
	let listCentent = ref([1, 2, 3, 4, 5])

	const toPlay = (item) => {

		uni.navigateTo({
			url: '/pages/checkpointList/checkpointList?id=' + item
		})
	}
</script>

<style lang="scss">
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		display: flex;
		justify-content: space-between;
		font-size: 36rpx;
		color: #8f8f94;

		.titleRight {
			width: 250rpx;
			justify-content: space-between;
			// margin-right: 20rpx;
		}
	}

	.listCentent {
		margin-top: 30%;
		height: 350rpx;

		.swiper-item {
			width: 100%;
			background-color: gray;
			justify-content: center;
			display: flex;
		}

		.itemPlay {
			width: 200rpx;
			height: 350rpx;
			background-color: red;
			margin-right: 15rpx;
		}
	}



	// 
	.userBox {
		align-items: center;
		margin-top: 100rpx;

		.user {
			height: 300rpx;
			background-color: blue;
		}
	}
</style>